<template>
	<view class="webview-h5-container">
		<web-view :src="url"></web-view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: '',
				dkjlUrl: 'https://open.weixin.qq.com/connect/oauth2/authorize?appid=wxbc20e61ad378ec64&redirect_uri=https%3a%2f%2fbiapex.huanai.com%2fords%2ff%3fp%3d900%3a2%3a%3a%3aNO%3a%3aP2_NEW%3a15&response_type=code&scope=snsapi_base#wechat_redirect'
			}
		},
		onLoad: function(option) {
			const that = this;
			console.log('webViewH5页面-option：');
			console.log(option);
			if (option.title) {
				// 设置H5页面标题
				uni.setNavigationBarTitle({
					title: option.title
				})
			}
			// 设置H5页面地址
			if (option.dkjlUrl) {
				// option.dkjlUrl===true时，设置H5页面地址
				that.url = that.dkjlUrl;
			} else {
				if (option.url) {
					that.url = option.url;
				}
			}
		},
		onShow: function() {

		},
		methods: {

		}
	}
</script>

<style>
	page,
	.webview-h5-container {
		width: 100%;
	}
</style>
